package com.wiscamp.ninechapters.problems.application.assemblers;

import com.wiscamp.ninechapters.problems.application.dto.vo.sheets.SheetDetailVO;
import com.wiscamp.ninechapters.problems.application.dto.vo.sheets.SheetAnswerVO;
import com.wiscamp.ninechapters.problems.application.dto.vo.sheets.SheetVO;
import com.wiscamp.ninechapters.problems.domain.models.sheets.Sheet;
import com.wiscamp.ninechapters.problems.domain.models.sheets.SheetDetail;
import com.wiscamp.ninechapters.problems.domain.models.sheets.SheetAnswer;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface SheetAssembler {
    SheetAssembler Instance = Mappers.getMapper(SheetAssembler.class);

    SheetVO toSheetVO(Sheet entity);

    SheetDetailVO toSheetDetailVO(SheetDetail entity);

    SheetAnswerVO toSheetTextExtensionVO(SheetAnswer entity);

}
